#include "point.h"
using std::sqrt;

Point::Point()
{
    this->x=0;
    this->y=0;
}

Point::Point(double x, double y)
{
    this->x=x;
    this->y=y;
}

double Point::getLen(const Point &a, const Point &b)
{
    return sqrt(square(a.x-b.x)+square(a.y-b.y));
}

double Point::getLen(const Point &p) const
{
    return sqrt(square(this->x-p.x)+square(this->y-p.y));
}

double Point::getX() const
{
    return this->x;
}

double Point::getY() const
{
    return this->y;
}
